<%@ page language="java" pageEncoding="UTF-8"%>

<div class="container">

	<div class="col-md-8 pull-left">
		<div>
			<ul class="nav nav-tabs">
			 	<li ng-class="{'active':forum.id==forumTab.id}" ng-repeat="forumTab in forums">
			  		<a ng-href="#/discuss/forum/{{forumTab.id}}">{{forumTab.name}}</a>
			  	</li>
			</ul>
		</div>
		
		<br/>
		<div>
			<div class="alert alert-info" ng-show="discuss==null || discuss.data==null || discuss.data.length==0">
				<i class="glyphicon glyphicon-exclamation-sign"></i> 暂时没有讨论
			</div>
			
			<div ng-show="discuss!=null && discuss.data!=null && discuss.data.length!=0">
				<div ng-repeat="dis in discuss.data">
					<include path="/discuss_layout.html"></include>
					<hr/>
				</div>
			</div>
			
			<paginate page-count="discuss.page_count" sum="discuss.data_sum" pn="discuss.pn" click="find"></paginate>
		</div>
	</div>
	
	<div class="col-md-4 pull-right">
		<div class="panel panel-default">
			<div class="panel-body" style="text-align: center;">
				<h4 style="color: #40AA53;">
					没有你想要的答案?
				</h4>
				
				<a ng-href="#/discuss/create?forum={{forum.id}}" class="btn btn-success">发表讨论</a>
			</div>
		</div>

		<div class="panel panel-default">
			<div class="panel-heading">
				<i class="glyphicon glyphicon-tags"></i> 热门标签
			</div>
			<div class="panel-body">
			
				<span ng-show="tags==null || tags.length==0">
					<div class="alert alert-info">暂时没有标签</div>
				</span>
				
				<div ng-repeat="tag in tags" style="float:left;margin-top: 10px;margin-right: 10px;">
					<span class="label label-default">{{tag.content | textOnly | summary:20}} ({{tag.count}})</span>
				</div>
			</div>
		</div>
	</div>
</div>